#ifndef CMANAGER_H
#define CMANAGER_H

#include "DataStruct.h"

#include <QFile>
#include <QLibrary>

typedef bool (*EEGAnalyse_InitParam)(int32_t iChanNum, int32_t iFrequency);

typedef bool (*EEGAnalyse_InputData)(double* pInData);

typedef bool (*EEGAnalyse_GetAmpResult)(tagAmpCalRet * pResult);

typedef bool (*EEGAnalyse_GetEEGResult)(tagEEGCalRet * pResult);

class CManager
{
    public:
        CManager();

        bool loadLib();

        bool openDataFile();

        bool analyse();

    private:

        // 动态加载库
        QLibrary* m_plib;

        // 数据文件
        QFile* m_pFile;


        EEGAnalyse_InitParam m_func_InitParam;

        EEGAnalyse_InputData m_func_InputData;

        EEGAnalyse_GetAmpResult m_func_GetAmpResult;

        EEGAnalyse_GetEEGResult m_func_GetEEGResult;


        tagEEGCalRet* m_pEEGResult;
        tagAmpCalRet* m_pAmpResult;

};

#endif // CMANAGER_H
